#define _CRT_SECURE_NO_WARNINGS 1
#include "vector.h"

    void print(const wusaqi::vector<int>& v)
    {
		for (auto ch : v)
		{
			cout << ch << " ";
		}
		cout << endl;
	}

	void test01()
	{
		wusaqi::vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		v.pop_back();



		for (int i = 0; i < v.size(); i++)
		{
			cout << v[i] << " ";
		}
		cout << endl;

		for (auto ch : v)
		{
			cout << ch << " ";
		}
		cout << endl;

		print(v);
	}

	void test02()
	{
		wusaqi::vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		//v.push_back(5);
		v.insert(v.begin(), 30);
		print(v);

		int x;
		cin >> x;
		wusaqi::vector<int>::iterator it = find(v.begin(), v.end(), x);
		if (it != v.end())
		{
			v.insert(it, x * 10);
		}
		print(v);
	}

	int main()
	{
		//test01();
		//cout << typeid(std::vector<int>::iterator).name() << endl;
		//cout << typeid(wusaqi::vector<int>::iterator).name() << endl;
		test02();
		return 0;
	}